package com.cjm.one.webmanager.service.customer.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjm.one.common.result.Result;
import com.cjm.one.custom.client.CustomGradeClient;
import com.cjm.one.model.custom.entity.CustomGrade;
import com.cjm.one.webmanager.service.customer.CustomGradeService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class CustomGradeServiceImpl implements CustomGradeService {
    @Resource
    private CustomGradeClient customGradeClient;
    @Override
    public Page<CustomGrade> list(Integer current, Integer size) {
        return customGradeClient.list(current,size).getData();
    }

    @Override
    public CustomGrade getById(Long id) {
        return customGradeClient.getInfo(id).getData();
    }

    @Override
    public Boolean create(CustomGrade customGrade) {
        return customGradeClient.create(customGrade).getData();
    }

    @Override
    public Boolean update(CustomGrade customGrade) {
        return customGradeClient.update(customGrade).getData();
    }

    @Override
    public Boolean deleteById(Long id) {
        return customGradeClient.delete(id).getData();
    }

    @Override
    public Boolean updateStatusById(Long id, Integer status) {
        return customGradeClient.updateStatus(id, status).getData();
    }
}
